import request from '@/utils/request'
const base_video_API = '/eduservice/video'

export default {

  // 添加小节
  addVideo(video) {
    return request({
      url: `${base_video_API}/addVideo`,
      method: 'post',
      data: video
    })
  },
  // 删除小节
  deleteVideo(videoId) {
    return request({
      url: `${base_video_API}/deleteVideo/${videoId}`,
      method: 'delete'
    })
  },

  // 根据ID查询小节
  selectVideoById(videoId){
    return request({
      url: `${base_video_API}/selectVideoById/${videoId}`,
      method: 'get'
    })
  },

  // 修改小节
  updateVideo(video){
    return request({
      url: `${base_video_API}/updateVideo`,
      method: 'post',
      data: video
    })
  }
}
